-- GENERATED SPELL FOR [Defiler Elite] --


function spell0_15128(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15128', 574, 1)
end

function spell1_15128(pUnit, Event) --@Shield Bash,n/a--
pUnit:FullCastSpellOnTarget(11972,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15128', 8334, 1)
end

function Sorts_15128(pUnit, Event)
local choix_sorts_15128 = math.random(0, 1)
if choix_sorts_15128 == 0 then
pUnit:RegisterEvent('spell0_15128', 1, 1)
end
if choix_sorts_15128 == 1 then
pUnit:RegisterEvent('spell1_15128', 1, 1)
end
end

function mob15128_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15128', math.random(1500, 3000), 1)
end

function mob15128_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15128_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15128_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15128, 1, 'mob15128_Action')
RegisterUnitEvent(15128, 2, 'mob15128_Leave')
RegisterUnitEvent(15128, 3, 'mob15128_Kill')
RegisterUnitEvent(15128, 4, 'mob15128_Die')
